import request from '@/utils/request'

export function pageUnit(data) {
  return request({
    url: '/unit/page',
    method: 'post',
    data
  })
}
export function getUnit(id) {
  return request({
    url: `/unit/get/${id}`,
    method: 'get',
  })
}
export function deleteUnit(id) {
  return request({
    url: `/unit/delete/${id}`,
    method: 'delete',
  })
}
export function saveUnit(data) {
  return request({
    url: '/unit/save',
    method: 'put',
    data
  })
}
export function editUnit(data) {
  return request({
    url: '/unit/edit',
    method: 'post',
    data
  })
}
export function listUnit() {
  return request({
    url: '/unit/list',
    method: 'get',
  })
}
